<%@ page import = "java.io.*, java.util.*,com.oreilly.servlet.MultipartRequest" %>
<%@ page import="com.oreilly.servlet.multipart.DefaultFileRenamePolicy" %>
<%@ page  contentType="text/html; charset=UTF-8"%>
   
<%		 
			String dir = application.getRealPath("/upload");
			request.setCharacterEncoding("KSC5601");		
			MultipartRequest multi =	new MultipartRequest(request, dir, 20 * 1024 * 1024,"euc-kr",
				new DefaultFileRenamePolicy());
			
// 			String id = multi.getParameter("id");
			String fileName = multi.getFilesystemName("file1");
			String ofileName = multi.getOriginalFileName("file1");
// 			String fileName2 = multi.getFilesystemName("file2");
// 			String ofileName2 = multi.getOriginalFileName("file2");
			
%>
<%-- id : <%= id%><br></br> --%>
upload file1: <a href='<%=dir%>/<%=fileName%>'><%=ofileName %></a><br></br>
<%-- upload file2: <a href='<%=dir%>/<%=fileName%>'><%=ofileName2 %></a><br></br> --%>
<a href='uploadlist.jsp'>전체화면 가기</a>